package com.woniu.user.entity.feign;

import com.woniu.entity.Result;
import com.woniu.user.pojo.PickAddress;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@FeignClient(value = "user-service", path = "pick-address", contextId = "address")
public interface PickAddressFeignClient {

    @GetMapping("/addressInfo/")
    public Result<List<PickAddress>> queryAll(HttpServletRequest request) throws Exception;

    @GetMapping("/addressInfo/{id}")
    public Result<PickAddress> queryById(@PathVariable("id") String id);
}
